/**
 * 角色管理api
 * @author xiaoxujs
 */

import { ISyhtRoleAddRoleParams, ISyhtRoleGetRoleAllParams, ISyhtRoleUpdateRoleParams } from "../../type/ConfigManagement/RolePage/api";
import { basicIp, newHttpService } from "../http";

// 分页查询角色
export const postSyhtRoleGetRoleAll = (data:ISyhtRoleGetRoleAllParams ) => {
    const url = basicIp + '/syht/role/getRoleAll';
    return newHttpService.postData(url, data)
}
// 添加角色
export const postSyhtRoleAddRole = (data: ISyhtRoleAddRoleParams) => {
    const url = basicIp + '/syht/role/addRole';
    return newHttpService.postData(url, data)
}
// 根据角色id查询角色
export const getSyhtRoleGetRole = (data: {roleId: string}) => {
    const url = basicIp + '/syht/role/getRole';
    return newHttpService.getData(url, data)
}
// 编辑角色
export const postSyhtRoleUpdateRole = (data: ISyhtRoleUpdateRoleParams) => {
    const url = basicIp + '/syht/role/updateRole';
    return newHttpService.postData(url, data)
}
// 删除角色
export const getSyhtRoleDeleteRole = (data: {roleId: string}) => {
    const url = basicIp + '/syht/role/deleteRole';
    return newHttpService.getData(url, data) 
}
